import http from "@/api/http";

class MicroBusinessApi {
  readonly url: string = "";
  constructor(url) {
    this.url = url;
  }
  list = <T>(params: any): Promise<T> => {
    return http.post(this.url + "/list", params);
  };

  remove = <T>(params: any): Promise<T> => {
    return http.post(this.url + "/remove", params);
  };

  query = <T>(params: any): Promise<T> => {
    return http.post(this.url + "/query", params);
  };

  subFormQuery = <T>(params: any): Promise<T> => {
    return http.post(this.url + "/subFormQuery", params);
  };

  save = <T>(params: any): Promise<T> => {
    return http.post(this.url + "/save", params);
  };
}
export default new MicroBusinessApi("/micro/business");
